<?php
namespace App\Controller;

use app\BaseController;

class Rank extends BaseController
{
    public function __construct(\think\App $app)
    {
        $this->app = $app;
        $this->request = $this->app->request;

        $this->UserModel = new \app\common\model\User;
        $this->RankModel = new \app\common\model\Rank;
    }

    //获取身份列表
    public function list(){
        if($this->request->isGet()){
            $userid = $this->request->param('userid', '', 'trim');

            $userInfo = $this->UserModel->where('id', $userid)->find();
            if(empty($userInfo)){
                return json(error_ful('账号不存在'));
            }
            $rankList = $this->RankModel->where('status','1')->select();

            return json(success_ful('等级列表',$rankList));
        }
    }

    //新增身份信息
    public function create(){
    }

    //修改身份信息
    public function update(){
    }

    //删除身份
    public function delete(){
    }

}